//
//  KongWFindHospitalDetailViewController.m
//  LoveOfPet
//
//  Created by dllo on 15/11/18.
//  Copyright © 2015年 孔维. All rights reserved.
//

#import "KongWFindHospitalDetailViewController.h"
#define kHeight     [UIScreen mainScreen].bounds.size.height / 667
#define kWidth      [UIScreen mainScreen].bounds.size.width / 375
@interface KongWFindHospitalDetailViewController ()<UIWebViewDelegate>
@property (retain, nonatomic) UIWebView *web;
@end

@implementation KongWFindHospitalDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    backBtn.frame = CGRectMake(0, 0, 30, 30);
    self.title = @"医院详情";
    [backBtn setBackgroundImage:[UIImage imageNamed:@"KongWback"] forState:UIControlStateNormal];
    [backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
    self.web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://app.5ichong.com/web.php/hospital?id=%@", self.udid]]];
    [self.view addSubview:self.web];
    [self.web loadRequest:request];
    [self.web release];
}
-(void)backBtnAction
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
